package com.jubaozan.feign.platform.activity;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jubaozan.c3.framework.utils.PageHolder;
import com.jubaozan.c3.framework.utils.ResultHolder;
import com.jubaozan.feign.platform.activity.vo.ActivityLogVO;
import com.jubaozan.feign.goods.vo.GoodsVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @ClassName ActivityFeignService
 * @Description TODO
 * @Author TanRuixiang
 * @Date 2020/9/24 11:20
 * @Version 1.0
 **/
@ApiIgnore
@FeignClient(name = "platform-service")
public interface ActivityFeignService {

    @ApiOperation(value = "根据平台id获取活动信息")
    @GetMapping("/activity/log/")
    ResultHolder<ActivityLogVO> getActivityByStoreId(@RequestParam("storeId")Long storeId);

    @ApiOperation(value = "根据平台id活动下的商品列表")
    @GetMapping("/activity/log/goods")
    ResultHolder<IPage<GoodsVO>> getGoodsListByStoreId(@RequestParam("storeId")Long storeId, @RequestParam("pageHolder") PageHolder pageHolder);


    @ApiOperation(value = "判断该商品是否存在于活动中")
    @GetMapping("/consume/activity/goods/{goodsId}")
    ResultHolder<Boolean> isExistGoodsInActivity(@RequestParam(value = "storeId") Long storeId, @RequestParam(value = "goodsId") Long goodsId);
}
